package com.dllo.lanou.cookapp;

import android.app.Application;
import android.content.Context;

import com.dllo.lanou.cookapp.entity.User;

import cn.bmob.v3.Bmob;
import cn.sharesdk.framework.ShareSDK;

/**
 * Created by xijinhua on 2016/2/13.
 */
public class BaseApplication extends Application {
private static Context context;
    private static boolean isLogin = false;
    private static long userId = 0;
    public static BaseApplication instance;
    @Override
    public void onCreate() {
        super.onCreate();
        context = this;
        instance = this;
        ShareSDK.initSDK(this);
        Bmob.initialize(this, "f8f69a0605e92dcc93eb63d464dee0dc");
    }

    public   static  Context getContext(){
        return  context;
    }

    public  User user;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public static boolean isLogin() {
        return isLogin;
    }

    public static void setIsLogin(boolean isLogin) {
        BaseApplication.isLogin = isLogin;
    }

    public static long getUserId() {
        return userId;
    }

    public static void setUserId(long userId) {
        BaseApplication.userId = userId;
    }
}
